/*
 * Copyright ©2015-2021 Jaemon. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gitee.jaemon.spring.adorner.annotation;

import java.lang.annotation.*;

/**
 * 排序
 *
 * <ul>
 *     <li>
 *         分组： 修饰类，所有的类进行排序； 修饰接口，类中所有的接口进行排序
 *     </li>
 *     <li>
 *         不分组： 仅根据修饰接口方法的值进行全局排序
 *     </li>
 * </ul>
 *
 * @author Jaemon
 * @since 1.0
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
public @interface ApiOrder {
    /**
     * Useful constant for the highest precedence value.
     * @see java.lang.Integer#MIN_VALUE
     */
    int HIGHEST_PRECEDENCE = Integer.MIN_VALUE;

    /**
     * Useful constant for the lowest precedence value.
     * @see java.lang.Integer#MAX_VALUE
     */
    int LOWEST_PRECEDENCE = Integer.MAX_VALUE;

    /**
     * The order value.
     * <p>Default is {@link #LOWEST_PRECEDENCE}.
     * @return
     *      order value
     */
    int value() default LOWEST_PRECEDENCE;

}